	<template>
		<u-popup :show="show" @close="show=false" :round="10">
			<view class="type-Box">
				<view class="title">请选择报考类型</view>
				<scroll-view scroll-y="true" class="list-box ">
					<view class="list f f-w ">
						<view v-for="(item,index) in list" :class="curt==index?'active':''" :key="index" class="f ai-c jc-c" @click="changeType(index)">{{item.name}}</view>
					</view>
				</scroll-view>
			</view>
		</u-popup>
	</template>

	<script>
		export default {			
			data() {
				return {
					show: false,
					curt: 0,
					list: []
				}
			},
			methods:{
				setData(data){
					this.list=data
				},
				changeType(index){
					if(this.curt==index)return
					this.curt=index
					this.show=false
					 this.$emit('changeType',this.list[index],index);
				},
				setPopup(){
					this.show=true
				}
			}
		}
	</script>


	<style scoped lang="scss">
		.type-Box {
			padding: 32rpx;
			box-sizing: border-box;

			.list-box {
				max-height: 500rpx;

				.list {			
					view {
						width: 30%;
						height: 75rpx;
						background: #fafafa;
						margin-top: 16rpx;
						font-size: 28rpx;
						margin-right: 3%;
						border-radius: 10rpx;
					}
					view:nth-child(3n){
						margin-right: 0;
					}
					.active{
						background: #e8efff;
						color: #3265fc;
					}
				}

			}

			.title {
				font-size: 28rpx;
				color: #000;
				font-weight: 800;
				margin-bottom: 24rpx;
			}
		}
	</style>